﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyMaster.master" AutoEventWireup="true" CodeFile="LaptopChiTiet.aspx.cs" Inherits="LaptopChiTiet" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div style="margin:10px 25px 0px 25px;">
        <asp:SqlDataSource ID="sql_sanpham" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            SelectCommand="SELECT * FROM sanpham WHERE id_row = @id_row">
            <SelectParameters>
                <asp:QueryStringParameter Name="id_row" QueryStringField="id_row" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:DataList ID="datalistSanPham" runat="server" DataKeyField="id_row" 
            DataSourceID="sql_sanpham" RepeatColumns="1" BackColor="White" 
            BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
            GridLines="Vertical">
            <AlternatingItemStyle BackColor="#DCDCDC" />
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
            <ItemStyle BackColor="#EEEEEE" ForeColor="Black" />
            <ItemTemplate>
                <table  width="720px" style="margin-top:5px; margin-bottom:5px;">
                    <tr>
                        <td style="text-align:left; vertical-align:middle; height:200px; width:200px;">
                            <asp:Image ID="imgHinhAnh" runat="server" Height="200px" Width="200px" 
                                ImageUrl='<%# "~/images/SanPham/" + Eval("id_row") + "/hinhchude.jpg" %>' />
                        </td>
                        <td style="text-align:left; vertical-align:top;">
                            <div style="margin-left:30px; margin-top:5px;">
                                <asp:HyperLink ID="hyp_tensp" runat="server" ForeColor="DarkBlue" Font-Bold="true" Text='<%# Eval("tensp") %>'
                                            NavigateUrl='<%# "~/LaptopChiTiet.aspx?id_row=" + Eval("id_row")%>'>
                                </asp:HyperLink> <br />
                                <asp:Label ID="lblTinhTrang" runat="server" 
                                    Text='<%# "Tình trạng: <b>" + Eval("tinhtrang") + "</b>" %>' /> <br />
                                <asp:Label ID="lblGiaBan" runat="server" 
                                    Text='<%# "Giá bán: <b>" + Eval("dongia","{0:###,###}") + " VNĐ</b>" %>' /> <br />
                                <asp:Label ID="lblDacDiem" runat="server" Text='<%# Eval("dacdiem") %>' />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:center;">
                            <asp:LinkButton ID="lbtnThem" runat="server" ForeColor="Blue" Text="Thêm vào giỏ hàng" />
                        </td>
                        <td></td>
                    </tr>
                </table>
            </ItemTemplate>
            <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        </asp:DataList>
    </div>    
        <%--<p>
            <b>CPU:</b> Intel® Core™ i3-2348M Processor, ( 2.3GHz, 3MB L2 Cache)<br /> 
            <b>RAM:</b> 2GB DDR3 1600GHz<br />
            <b>OS:</b> Tùy chọn <br />
            <b>Ổ cứng:</b> 500GB <br />
            <b>Đĩa quang:</b> DVD+/-RW <br />
            <b>Loại Pin:</b> 6 Cell <br />
            <b>Card màn hình:</b> AMD Radeon HD 7450 1GB
        </p>--%>
</asp:Content>

